//
//  HQApp.m
//  试一下demo
//
//  Created by quan on 15/11/18.
//  Copyright © 2015年 quan. All rights reserved.
//

#import "HQApp.h"

@implementation HQApp

+ (instancetype) appWithDict:(NSDictionary *)dict{
    return [[self alloc] initWithDict:dict];
}
- (instancetype) initWithDict:(NSDictionary *)dict{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

+(NSArray *) apps{
    NSArray *sourceArr = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"AppShow.plist" ofType:nil]];
    NSMutableArray *desArr = [NSMutableArray array];
    for (NSDictionary *dic in sourceArr) {
        HQApp *app = [ HQApp appWithDict:dic];
        [desArr addObject:app];
    }
    return desArr;
}

@end
